import request from '@/utils/request'

// 获取列表
export function getList() {
  return request({
    url: '/apartment/group/list',
    method: 'get',
  })
}

// 添加分组
export function save(data) {
  return request({
    url: '/apartment/group',
    method: 'post',
    data: data
  })
}

// 编辑分组
export function edit(data) {
  return request({
    url: '/apartment/group',
    method: 'put',
    data: data
  })
}

// 删除分组
export function remove(groupIds) {
  return request({
    url: `/apartment/group/${groupIds}`,
    method: 'delete',
  })
}

export default {
  getList,
  save,
  edit,
  remove
}